package com.ukao.steward.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by ukaodev on 2017/12/6.
 */

public class RepetitionBean implements Parcelable {


    private String businessName;
    private String businessId;

    public    RepetitionBean(String  businessName,String  businessId   ){
        this.businessId=businessId;
        this.businessName=businessName;
    }


    public String getBusinessId() {
        return businessId;
    }

    public void setBusinessId(String businessId) {
        this.businessId = businessId;
    }

    public String getBusinessName() {
        return businessName;
    }

    public void setBusinessName(String businessName) {
        this.businessName = businessName;
    }


    @Override
    public boolean equals(Object arg0) {
        // TODO Auto-generated method stub
        RepetitionBean p = (RepetitionBean) arg0;
        return businessName.equals(p.businessName) && businessId==(p.businessId);
    }

    @Override
    public int hashCode() {
        // TODO Auto-generated method stub
        String str = businessName + businessId;
        return str.hashCode();
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.businessName);
        dest.writeString(this.businessId);
    }

    protected RepetitionBean(Parcel in) {
        this.businessName = in.readString();
        this.businessId = in.readString();
    }

    public static final Creator<RepetitionBean> CREATOR = new Creator<RepetitionBean>() {
        @Override
        public RepetitionBean createFromParcel(Parcel source) {
            return new RepetitionBean(source);
        }

        @Override
        public RepetitionBean[] newArray(int size) {
            return new RepetitionBean[size];
        }
    };
}
